package cn.org.book.shop.article.domain;

import cn.org.book.shop.common.annotation.Excel;
import cn.org.book.shop.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;


/**
 * APP用户频道信息对象 ap_download
 *
 * @author julywhj
 * @date 2020-11-17
 */
public class ApDownload extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    private Long id;

    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    private Long channelId;

    /**
     * 文章ID
     */
    @Excel(name = "文章ID")
    private Long articleId;

    /**
     * $column.columnComment
     */
    @Excel(name = "文章名称")
    private String name;

    /**
     * 素材下载地址
     */
    @Excel(name = "素材下载地址")
    private String url;

    /**
     * 存储类型
     * 0 阿里云
     * 1 七牛云
     * 2 腾讯云
     */
    @Excel(name = "存储类型")
    private Integer storageType;

    /**
     * 素材类型
     * 0 文本
     * 1 图片
     * 2视频
     */
    @Excel(name = "素材类型")
    private Integer materialType;

    /**
     * 登录时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "登录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /**
     * 删除状态标识
     * 0 删除
     * 1 未删除
     */
    @Excel(name = "删除状态标识")
    private Integer isDel;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setChannelId(Long channelId) {
        this.channelId = channelId;
    }

    public Long getChannelId() {
        return channelId;
    }

    public void setArticleId(Long articleId) {
        this.articleId = articleId;
    }

    public Long getArticleId() {
        return articleId;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUrl() {
        return url;
    }

    public void setStorageType(Integer storageType) {
        this.storageType = storageType;
    }

    public Integer getStorageType() {
        return storageType;
    }

    public void setMaterialType(Integer materialType) {
        this.materialType = materialType;
    }

    public Integer getMaterialType() {
        return materialType;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setIsDel(Integer isDel) {
        this.isDel = isDel;
    }

    public Integer getIsDel() {
        return isDel;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("channelId", getChannelId())
                .append("articleId", getArticleId())
                .append("name", getName())
                .append("url", getUrl())
                .append("storageType", getStorageType())
                .append("materialType", getMaterialType())
                .append("createdTime", getCreatedTime())
                .append("isDel", getIsDel())
                .toString();
    }
}
